package com.hzp.service;

import com.hzp.entity.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "provider-server",fallback = DeptClientServiceFallback.class)
public interface DeptClientService {

    @RequestMapping(value = "/dept/list",method = RequestMethod.GET)
    List<Dept> listDept();

    @RequestMapping(value = "/dept/get/{id}",method = RequestMethod.GET)
    Dept getDept(@PathVariable("id") Integer id);

    @RequestMapping(value = "/dept/add",method = RequestMethod.POST)
    boolean addDept(@RequestBody Dept dept);

    @GetMapping(value = "/dept/get/timeout")
    String getTimeout();
}
